package com.haier.dreambox.demo.bean.uplus;


import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;


/**
 * Created by smalant on 14/12/29.
 */
@DatabaseTable
public class Device{


    @DatabaseField
    public String id;

    @DatabaseField(id = true)
    public String mac;

    @DatabaseField
    public String name;

    @DatabaseField(foreign=true, foreignAutoCreate = true,foreignAutoRefresh = true)
    public DeviceAttribute attrs;

    @DatabaseField(foreign=true, foreignAutoCreate = true,foreignAutoRefresh = true)
    public DeviceType type;

    @DatabaseField(foreign=true, foreignAutoCreate = true,foreignAutoRefresh = true)
    public DeviceVersion version;

    @DatabaseField(foreign=true, foreignAutoCreate = true,foreignAutoRefresh = true)
    public DeviceLocation location;

    @DatabaseField(foreign=true, foreignAutoCreate = true,foreignAutoRefresh = true)
    public DeviceStatus status;


    public String toString() {
        return "Device{" +
                "id='" + id + '\'' +
                ", mac='" + mac + '\'' +
                ", name='" + name + '\'' +
                ", attrs=" + attrs +
                ", type=" + type +
                ", version=" + version +
                ", location=" + location +
                ", status=" + status +
                '}';
    }
}
